package superminer.xinfang.com.ipreport.util;

import android.content.Context;
import android.content.pm.PackageManager;

/**
 * Created by Administrator on 2017/8/25.
 */

public class VerUtils {
    /**
     * 获取版本名称
     * @param context
     * @return
     */
    public static String getVerName(Context context) {
        String verName = "";
        try {
            verName = context.getPackageManager().getPackageInfo(
                    "superminer.xinfang.com.ipreport", 0).versionName;
        } catch (PackageManager.NameNotFoundException e) {

        }
        return verName;
    }
}
